Added keyboard CTRL and CMMD keybindings outside of fullscreen mode#1213
Open
tvinhas wants to merge 1 commit into
Open
Added keyboard CTRL and CMMD keybindings outside of fullscreen mode#1213tvinhas wants to merge 1 commit into
tvinhas wants to merge 1 commit into
Conversation
IDisposable
reviewed
Feb 25, 2026
| const [visible, setVisible] = useState(true); | ||
|
|
||
| useEffect(() => { | ||
| const timer = setTimeout(() => setVisible(false), 8000); |
Contributor
There was a problem hiding this comment.
8 seconds seems a little long for a toast message... thoughts?
| const isPointerLockPossible = | ||
| window.location.protocol === "https:" || window.location.hostname === "localhost"; | ||
|
|
||
| // macOS detection for Meta key fix |
Contributor
There was a problem hiding this comment.
Move this to the utils.ts, perhaps?
| try { | ||
| // @ts-expect-error - keyboard lock is not supported in all browsers | ||
| await navigator.keyboard.lock(); | ||
| console.debug("Keyboard lock acquired"); |
Contributor
There was a problem hiding this comment.
Probably can delete this debug and the one on line 172.
I would also make line 162 a console.error
| } | ||
| } | ||
|
|
||
| // When pressing the meta key + another key, the key will never trigger a keyup |
Contributor
There was a problem hiding this comment.
This was not specific to mac machines. We need to be careful deleting these work-arounds.
| // PiKVM-style fix: When Meta is released on macOS, release all keys to clean up | ||
| // stuck companion keys (Chrome doesn't fire their keyup events) | ||
| // https://bugs.chromium.org/p/chromium/issues/detail?id=28089 | ||
| if (isMacClient && (code === "MetaLeft" || code === "MetaRight")) { |
Contributor
There was a problem hiding this comment.
This is not mac specific. All browsers will act this way. Additionally, we should be careful about releasing all keys given we really shouldn't change the state of keys that are still actually down.
terryrankine
added a commit
to terryrankine/kvm
that referenced
this pull request
May 7, 2026
- Add keyboardCaptureMode (bool, persisted) and its setter to useSettingsStore so the setting survives page reloads - Add isKeyboardLockActive / setIsKeyboardLockActive to useUiStore for runtime tracking of the Keyboard Lock API state - Refactor useFullscreen: acquire keyboard lock on fullscreen enter (from the fullscreenchange event, as required by the API), keep lock on exit when keyboardCaptureMode is on, release otherwise; sync lock state whenever the setting changes outside fullscreen - Add "KB Capture" toggle button to BottomBarPC with Active/Limited status indicator; shows a success toast on toggle via notifications Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Checklist
make test_e2elocally and passedCloses #<issue-number>)